home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: New Zealand Amiga Users Group / New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).zip / New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).adf / StrucBrowser / sb.src.zoo / SBMsgPort.c < prev    next >
C/C++ Source or Header  |  1988-06-22  |  2KB  |  67 lines

  1. /************************************************************************
  2. *                                    *
  3. *                SBMsgPort                *
  4. *                                    *
  5. *        module written by G. Gagnon, Mar 24, 1987        *
  6. *                                    *
  7. *************************************************************************/
  8.  
  9. #include "sb:sb.h"
  10.  
  11. extern int level;
  12.  
  13.  
  14. void PrMsgPort(string, msgport) char *string; struct MsgPort *msgport;
  15. {
  16. static struct StructData structdata[] = {
  17.      { "-mp_Node",         "Node structure",    0, 0        },
  18.      { "   .ln_Succ",      "struct Node *",     5, PTRSIZE  },
  19.      { "   .ln_Pred",      "struct Node *",     5, PTRSIZE  },
  20.      { "-  .ln_Type",      "UBYTE",            13, BYTESIZE },
  21.      { "-  .ln_Pri",       "BYTE",              3, BYTESIZE },
  22.      { "   .ln_Name",      "CHAR *",            4, PTRSIZE  },
  23.      { "-mp_Flags",        "UBYTE",            13, BYTESIZE },
  24.      { "-mp_SigBit",       "UBYTE",            13, BYTESIZE },
  25.      { "(mp_SigTask",      "struct Task *)",    5, PTRSIZE  },
  26.      { "-mp_MsgList",      "List structure",    0, 0        },
  27.      { "   .lh_Head",      "struct Node *",     5, PTRSIZE  },
  28.      { "   .lh_Tail",      "struct Node *",     5, PTRSIZE  },
  29.      { "   .lh_TailPred",  "struct Node *",     5, PTRSIZE  },
  30.      { "-  .lh_Type",      "UBYTE",            13, BYTESIZE },
  31.      { "-  .l_pad",        "UBYTE",            13, BYTESIZE }
  32.   };
  33. int sum, choice = -1;
  34.   level++;
  35.   while (choice) {
  36.     sum = SetOptionText(string, structdata, (APTR)msgport, DATASIZE, 0);
  37.     switch (choice = GetChoice(DATASIZE)) {
  38.       case 2:
  39.         if (msgport->mp_Node.ln_Succ)
  40.           PrNode("MsgPort->mp_Node.ln_Succ", msgport->mp_Node.ln_Succ);
  41.         break;
  42.       case 3:
  43.         if (msgport->mp_Node.ln_Pred)
  44.           PrNode("MsgPort->mp_Node.ln_Pred", msgport->mp_Node.ln_Pred);
  45.         break;
  46.       case 6:
  47.         PrString("mp_Node->ln_Name",msgport->mp_Node.ln_Name);
  48.         break;
  49.       case 11:
  50.         if (msgport->mp_MsgList.lh_Head)
  51.           PrNode("MsgPort->mp_MsgList.lh_Head", msgport->mp_MsgList.lh_Head);
  52.         break;
  53.       case 12:
  54.         if (msgport->mp_MsgList.lh_Tail)
  55.           PrNode("MsgPort->mp_MsgList.lh_Tail", msgport->mp_MsgList.lh_Tail);
  56.         break;
  57.       case 13:
  58.         if (msgport->mp_MsgList.lh_TailPred)
  59.           PrNode("MsgPort->mp_MsgList.lh_TailPred", msgport->mp_MsgList.lh_TailPred);
  60.         break;
  61.     }
  62.   }
  63.   level--;
  64. }
  65.  
  66.  
  67.